Monitor Object An Object Behavioral Pattern for Concurrent Programming
نویسنده
چکیده
handler and consumer handler objects that run in separate threads and route messages from one or more remote suppliers to one or more remote consumers, respectively. When a supplier handler thread receives a message from a remote supplier, it uses an address field in the message to determine the corresponding consumer handler, whose thread then delivers the message to its remote consumer. When suppliers and consumers reside on separate hosts, the Gateway uses the connection-oriented TCP [1] protocol to provide reliable message delivery and end-to-end flow control. TCP’s flow control algorithm blocks fast senders when they produce messages more rapidly than slower receivers can process the messages. The entire Gateway should not block, however, while waiting for flow control to abate on outgoing TCP connections. To minimize blocking, therefore, each consumer handler can contain a thread-safe message queue that buffers new routing messages it receives from its supplier handler threads. One way to implement a thread-safe Message Queue is to use the Active Object pattern [2], which decouples the thread used to invoke a method from the thread used to execute the method. As shown in Figure 2, each message queue active object contains a bounded buffer and its own thread of control that maintains a queue of pending messages. Using
منابع مشابه
Concurrent Object-Oriented Development with Behavioral Design Patterns
The development of concurrent applications is challenging because of the complexity of concurrent designs and the hazards of concurrent programming. Architectural modeling using the Unified Modeling Language (UML) can support the development process, but the problem of mapping the model to a concurrent implementation remains. This paper addresses this problem by defining a scheme to map concurr...
متن کاملActive Object an Object Behavioral Pattern for Concurrent Programming
This paper describes the Active Object pattern, which decouples method execution from method invocation in order to simplify synchronized access to a shared resource by methods invoked in different threads of control. The Active Object pattern allows one or more independent threads of execution to interleave their access to data modeled as a single object. A broad class of producer/consumer and...
متن کاملDeclarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey
One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...
متن کاملUNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Concurrent Object-Oriented Programming: Separation and Composition of Concerns using Design Patterns, Pattern Languages, and Object-Oriented Frameworks
The development of concurrent object-oriented programs, from a software engineering perspective, must possess a set of features to allow control of its inherent complexities, such as non-determinism. This dissertation contributes the definition of an approach for constructing concurrent object-oriented programs. The approach is rooted in a divide-and-conquer strategy, in which functional and no...
متن کاملModelsaz: An Object-Oriented Computer-Aided Modeling Environment
Modeling and simulation of processing plants are widely used in industry. Construction of a mathematical model for a plant is a time-consuming and error-prone task. In light of extensive advancements in computer science (both hardware and software), computers are becoming a necessary instrument in industrial activities. Many software tools for modeling, simulation and optimization of proces...
متن کامل